import http from '@/service/http'
import type * as T from '@/types/api/index'
const postApi: T.IPostApi = {
  allList() {
    return http.get('/admin/post/list')
  },
  list(params) {
    return http.get('/admin/post/page', params)
  },
  add(data) {
    return http.post('/admin/post', data)
  },
  edit(data) {
    return http.put('/admin/post', data)
  },
  del(data) {
    return http.delete('/admin/post', data.ids)
  },
}

export default postApi
